std Function

public function std(a) result(s)

Function to calculate the standard deviation of a real array

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(inout), dimension(:) :: a

A real array

Return Value real(kind=wp)

A real variable with the calculated standard deviation


Calls

proc~~std~~CallsGraph proc~std std proc~variance variance proc~std->proc~variance proc~mean mean proc~variance->proc~mean float float proc~mean->float

Called by

proc~~std~~CalledByGraph proc~std std proc~coefficient_of_variation coefficient_of_variation proc~coefficient_of_variation->proc~std proc~correlation_coefficient correlation_coefficient proc~correlation_coefficient->proc~std

Source Code

    function std(a) result(s)
!=============================================================================================
!! Function to calculate the standard deviation of a real array
        real(kind=wp),dimension(:),intent(inout) :: a
!! A real array
        real(kind=wp) :: s
!! A real variable with the calculated standard deviation
        real(kind=wp) :: v
        !
        v=variance(a);
        s=sqrt(v);
!
    end function std